package com.VolunteerPlatform.Service.AdminService.impl;

import com.VolunteerPlatform.Dao.AdminRoleDao;
import com.VolunteerPlatform.Entity.AdminRoleInfo;
import com.VolunteerPlatform.Service.AdminService.AdminRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by DoveXL on 2018/12/4.
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class AdminRoleServiceImpl implements AdminRoleService{


    @Autowired
    private AdminRoleDao adminRoleDao;
    public List<AdminRoleInfo> findByUserNameService(String UserName)
    {
        return adminRoleDao.findByUserName(UserName);
    }
    public List<AdminRoleInfo> getUserRoleService(String UserName,String AdminID,int Page,int PageList)
    {
        return adminRoleDao.getUserRole(UserName,AdminID,Page,PageList);
    }
    public int updateAdminRoleInfoService(String UserName,String AdminID)
    {
        return  adminRoleDao.updateAdminRoleInfo(UserName,AdminID);
    }
    public int insertAdminRoleInfoService(String UserName,String AdminID)
    {
        return adminRoleDao.insertAdminRoleInfo(UserName,AdminID);
    }
}
